.yun-collapse {
  background-color: #fafafa;
  border-radius: var(--yun-border-base-radius);
  border: var(--yun-border-base);
  > .yun-collapse-item {
    border-top: var(--yun-border-base);
    &:first-child {
      border-top: none;
    }
    > .yun-collapse-header {
      line-height: var(--yun-base-line-height);
      padding: 10px 16px;
      color: var(--yun-color-text-primary);
      cursor: pointer;
      position: relative;
      border-bottom: 1px solid transparent;
      transition: all var(--yun-animation-duration-base) ease-in-out;
      > i.yun-icon-right {
        transition: transform var(--yun-animation-duration-base) ease-in-out,
          -webkit-transform var(--yun-animation-duration-base) ease-in-out;
        margin-right: 10px;
        vertical-align: -1px;
        font-size: 14px;
      }
    }
    &.yun-collapse-item-active {
      > .yun-collapse-header {
        border-bottom: var(--yun-border-base);
        > i.yun-icon-right {
          -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
        }
      }
    }
  }
}
.yun-collapse-content {
  color: var(--yun-color-text-default);
  padding: 0 16px;
  background-color: #fff;
  > .yun-collapse-content-box {
    padding-top: 16px;
    padding-bottom: 16px;
    line-height: 2em;
    font-size: var(--yun-base-font-size);
  }
}
.yun-collapse-simple {
  border-left: none;
  border-right: none;
  background-color: #fff;
  border-radius: 0;
}
.yun-collapse-wrap {
  background: #fff;
  box-shadow: 0 1px 3px 1px #eeeeee;
  .header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    color: var(--yun-color-text-primary);
    background: #fff;
    transition: var(--yun-animation-duration-base);
    &.is-collapse {
      cursor: pointer;
    }
    .label {
      position: relative;
      display: inline-block;
      vertical-align: middle;
      padding: 0 16px;
      line-height: 40px;
      font-size: 14px;
      font-weight: 500;
      &:after {
        content: '';
        position: absolute;
        background-color: var(--yun-color-primary);
        left: 0;
        top: 12px;
        bottom: 12px;
        width: 2px;
      }
    }
    > .title {
      position: relative;
      display: inline-block;
      vertical-align: middle;
      padding: 0 16px;
      line-height: 40px;
      font-size: 14px;
      font-weight: 500;
    }
    .right {
      padding-right: 16px;
      &.can-collapse {
        padding-right: 50px;
      }
    }
    .arrow {
      position: absolute;
      top: 50%;
      right: 16px;
      transform: translateY(-50%);
      transition: var(--yun-animation-duration-base);
      .yun-iconfont {
        font-size: 14px;
        vertical-align: -1px;
      }
    }
  }
  .content {
    color: rgba(0, 0, 0, 0.65);
    background-color: #fff;
  }
  &-active {
    .header {
      box-shadow: 0 1px 3px 1px #eeeeee;
      .arrow {
        transform: translateY(-50%) rotate(180deg);
      }
    }
  }
  + .yun-collapse-wrap {
    margin-top: 16px;
  }
}
